package com.ihunanren.dao.ibatis.taobao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import com.ihunanren.dao.pojo.TaobaoCouponsDO;
import com.ihunanren.dao.taobao.ITaobaoCouponsDao;

/**
 * @author kalman03
 */
public class TaobaoCouponsDao extends SqlMapClientTemplate implements ITaobaoCouponsDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<TaobaoCouponsDO> getCoupons(int num) throws SQLException {
		return getSqlMapClient().queryForList("TaobaoCouponsDao.getCoupons", num);
	}

	@Override
	public void addCoupon(TaobaoCouponsDO coupon) throws SQLException {
		getSqlMapClient().insert("TaobaoCouponsDao.addCoupon", coupon);
	}

}
